package com.ruoyi.xgssc.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.courses.domain.JwCourses;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xgssc.mapper.XgStudyStyleConstructionMapper;
import com.ruoyi.xgssc.domain.XgStudyStyleConstruction;
import com.ruoyi.xgssc.service.IXgStudyStyleConstructionService;

/**
 * 学风建设Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-23
 */
@Service
public class XgStudyStyleConstructionServiceImpl implements IXgStudyStyleConstructionService 
{
    @Autowired
    private XgStudyStyleConstructionMapper xgStudyStyleConstructionMapper;

    /**
     * 查询学风建设
     * 
     * @param sscId 学风建设主键
     * @return 学风建设
     */
    @Override
    public XgStudyStyleConstruction selectXgStudyStyleConstructionBySscId(Long sscId)
    {
        return xgStudyStyleConstructionMapper.selectXgStudyStyleConstructionBySscId(sscId);
    }

    /**
     * 查询学风建设列表
     * 
     * @param xgStudyStyleConstruction 学风建设
     * @return 学风建设
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<XgStudyStyleConstruction> selectXgStudyStyleConstructionList(XgStudyStyleConstruction xgStudyStyleConstruction)
    {
        return xgStudyStyleConstructionMapper.selectXgStudyStyleConstructionList(xgStudyStyleConstruction);
    }

    /**
     * 新增学风建设
     * 
     * @param xgStudyStyleConstruction 学风建设
     * @return 结果
     */
    @Override
    public int insertXgStudyStyleConstruction(XgStudyStyleConstruction xgStudyStyleConstruction)
    {
        return xgStudyStyleConstructionMapper.insertXgStudyStyleConstruction(xgStudyStyleConstruction);
    }
    
    /**
     * 修改学风建设
     * 
     * @param xgStudyStyleConstruction 学风建设
     * @return 结果
     */
    @Override
    public int updateXgStudyStyleConstruction(XgStudyStyleConstruction xgStudyStyleConstruction)
    {
        xgStudyStyleConstruction.setUpdateTime(DateUtils.getNowDate());
        return xgStudyStyleConstructionMapper.updateXgStudyStyleConstruction(xgStudyStyleConstruction);
    }

    /**
     * 批量删除学风建设
     * 
     * @param sscIds 需要删除的学风建设主键
     * @return 结果
     */
    @Override
    public int deleteXgStudyStyleConstructionBySscIds(Long[] sscIds)
    {
        return xgStudyStyleConstructionMapper.deleteXgStudyStyleConstructionBySscIds(sscIds);
    }

    /**
     * 删除学风建设信息
     * 
     * @param sscId 学风建设主键
     * @return 结果
     */
    @Override
    public int deleteXgStudyStyleConstructionBySscId(Long sscId)
    {
        return xgStudyStyleConstructionMapper.deleteXgStudyStyleConstructionBySscId(sscId);
    }
}
